package com.itheima.domain;

/**
 * @author Zhang_Han
 * @version 1.0
 * @date 2020/7/17 11:31
 */
public class Student {
    public String name;
    public int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Student() {
        System.out.println("空参构造方法!");
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;

        System.out.println("有参构造方法!");
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
    private  Student(String name){

    }

}
